package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysAcceptancecontractMapper;
import com.ruoyi.system.domain.SysAcceptancecontract;
import com.ruoyi.system.service.ISysAcceptancecontractService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购单位验收合同Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-13
 */
@Service
public class SysAcceptancecontractServiceImpl implements ISysAcceptancecontractService 
{
    @Autowired
    private SysAcceptancecontractMapper sysAcceptancecontractMapper;

    /**
     * 查询采购单位验收合同
     * 
     * @param acceptanceContractId 采购单位验收合同ID
     * @return 采购单位验收合同
     */
    @Override
    public SysAcceptancecontract selectSysAcceptancecontractById(Long acceptanceContractId)
    {
        return sysAcceptancecontractMapper.selectSysAcceptancecontractById(acceptanceContractId);
    }

    /**
     * 查询采购单位验收合同列表
     * 
     * @param sysAcceptancecontract 采购单位验收合同
     * @return 采购单位验收合同
     */
    @Override
    public List<SysAcceptancecontract> selectSysAcceptancecontractList(SysAcceptancecontract sysAcceptancecontract)
    {
        return sysAcceptancecontractMapper.selectSysAcceptancecontractList(sysAcceptancecontract);
    }

    /**
     * 新增采购单位验收合同
     * 
     * @param sysAcceptancecontract 采购单位验收合同
     * @return 结果
     */
    @Override
    public int insertSysAcceptancecontract(SysAcceptancecontract sysAcceptancecontract)
    {
        sysAcceptancecontract.setCreateTime(DateUtils.getNowDate());
        return sysAcceptancecontractMapper.insertSysAcceptancecontract(sysAcceptancecontract);
    }

    /**
     * 修改采购单位验收合同
     * 
     * @param sysAcceptancecontract 采购单位验收合同
     * @return 结果
     */
    @Override
    public int updateSysAcceptancecontract(SysAcceptancecontract sysAcceptancecontract)
    {
        return sysAcceptancecontractMapper.updateSysAcceptancecontract(sysAcceptancecontract);
    }

    /**
     * 删除采购单位验收合同对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysAcceptancecontractByIds(String ids)
    {
        return sysAcceptancecontractMapper.deleteSysAcceptancecontractByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除采购单位验收合同信息
     * 
     * @param acceptanceContractId 采购单位验收合同ID
     * @return 结果
     */
    @Override
    public int deleteSysAcceptancecontractById(Long acceptanceContractId)
    {
        return sysAcceptancecontractMapper.deleteSysAcceptancecontractById(acceptanceContractId);
    }
}
